<template>
<div>

  <audio :src="addUrl" controls  muted style="width: 100%; height: 20px;">
  </audio>

</div>
</template>

<script>
  export default {
    name: "VoicePreview",
    props: {
      src: {

      }
    },
    data(){
      return {
      }
    },
    created(){
    },
    methods: {
      player(event) {
      }
    },
    computed: {
      addUrl(){
        if(!this.src){
          return "";
        }
        if(this.src.indexOf('http')!=-1){
        return this.src;
        }
        return this.$resVoiceBaseUrl+this.src
      }
    },

  };
</script>

<style lang="scss" scoped>
  .el-image {
    border-radius: 5px;
    background-color: #ebeef5;
    box-shadow: 0 0 5px 1px #ccc;

    ::v-deep .el-image__inner {
      transition: all 0.3s;
      cursor: pointer;

      &:hover {
        transform: scale(1.2);
      }
    }

    ::v-deep .image-slot {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100%;
      height: 100%;
      color: #909399;
      font-size: 30px;
    }
  }
</style>
